package com.java.demo;

import com.java.demo.model.ArticleInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Order(5)
@Service
public class User {

    @Bean({"articleInfo"})
    public ArticleInfo getArticle() {
        ArticleInfo articleInfo = new ArticleInfo();
        articleInfo.setAid(1);
        articleInfo.setTitle("今天周几？");
        articleInfo.setContent("今天周三！");
        articleInfo.setCreatetime(LocalDateTime.now());
        return articleInfo;

    }
    public User() {
        System.out.println("User Init");
    }
    public void sayHi() {
        System.out.println("Hi,User~");
    }
}
